{php include wl_template('common/header');}
{php include wl_template('diy/common/_common');}
<ul class="nav nav-tabs">
    <li><a href="{php echo web_url($backUrl)}">菜单管理</a></li>
    <li class="active"><a href="javascript:;">编辑菜单</a></li>
</ul>
<div class="app-content">
	<div class="form-group-title">编辑菜单</div>
    <div class="main panel panel-default">
        <div class="page-content">
            <div class="row relative w900">
                <!--手机内容-->
                <div class="diy-phone" id="menuDiy-phone" data-merch="0">
                    <div class="phone-head"></div>
                    <div class="phone-body">
                        <div class="phone-title" id="page">自定义菜单</div>
                        <div class="phone-main" id="phone" style="position: relative; overflow: hidden">
                            <p style="text-align: center; line-height: 400px">loading...</p>
                        </div>
                    </div>
                    <div class="phone-foot"></div>
                </div>
                <!--配置信息内容-->
                <div class="diy-editor form-horizontal" id="diy-editor">
                    <div class="editor-arrow"></div>
                    <div class="inner"></div>
                </div>
                {php include wl_template('diy/common/_template_menu');}
            </div>
        </div>
        <div class="page-footer"><nav class="btn btn-primary btn-sm btn-save" data-type="save">保存菜单</nav></div>
    </div>
</div>
<script language="javascript">
    myrequire(['diy/js/diy.menu','diy/js/tpl','js/biz'],function(modal,tpl){
        modal.init({
            menu_class:"{$menuClass}",
            back_url:"{$backUrl}",
            tpl: tpl,
            attachurl: "{$_W['attachurl']}",
            id: '{php echo intval($_GPC["id"])}',
            menu: {if !empty($menu['data'])}{php echo json_encode($menu['data'])}{else}null{/if},
            merch: 0
        });
    });
    function showSubMenu(obj) {
        $(obj).toggleClass('on').siblings().removeClass('on');
        $(obj).find('.child').toggleClass('in');
        $(obj).siblings().find('.child').removeClass('in')
    }
</script>
<style>
	.diy-editor {height: auto;overflow-y: hidden;display: block;margin: 0;position: inherit;width: 480px;float: right;}
	.page-content {height: auto;padding-bottom: 60px;}
	.page-footer {width: calc(100% - 230px);height: 60px;text-align: center;padding: 5px 0;background-color: #f9faff;position: fixed;left: 220px;bottom: 0;z-index: 999;}
	.page-footer .btn {font-size: 14px;margin-top: 10px;padding: 6px 12px;}
    #imgText{
        position: absolute;
        z-index: 99999;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: none;
    }
    #imgText .bgBlock{
        width: 100vw;
        height: 110vh;
        position: absolute;
        z-index: 99998;
        opacity: .5;
        background: #000;
    }
    #imgText .modal-content{
        position: absolute;
        z-index: 99999;
        top: 15%;
        left: 25%;
        border-radius: 0;
        max-height: 700px;
        max-width: 1000px;
    }
    #iconContent .item{
        width: 120px;
        height: 80px;
        display: inline-block;
        text-align: center;
        margin: 10px 4px;
        cursor: pointer;
    }
    #iconContent .item:hover{
        background: #f3f3f3;
    }
    #iconContent .item .icon img{
        width: 50px;
        height: 50px;
    }
</style>
{php include wl_template('common/footer');}